//index.js
//获取应用实例
const app = getApp()
Page({
  //事件处理函数
  bindViewTap: function () {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  getPhoneNumber: function (e) {
    console.log(e.detail.errMsg)
    console.log(e.detail.iv)
    console.log(e.detail.encryptedData)
  } ,
  onLoad: function () {
    var self = this
    wx.getUserInfo({
      success:function(res){
        console.log(res)
        var userInfo = res.userInfo
        self.setData({
          userImage: userInfo.avatarUrl,
          userName: userInfo.nickName
        })
      }
    })
    this.setData({
      userTel: app.globalData.userInfo.phone
    })
  }
})
